\(\int \csc ^8(c+d x) (a+a \sec (c+d x))^2 \, dx\) [36]

   Optimal result
   Rubi [A] (verified)
   Mathematica [B] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F(-1)]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 21, antiderivative size = 163 \[ \int \csc ^8(c+d x) (a+a \sec (c+d x))^2 \, dx=\frac {2 a^2 \text {arctanh}(\sin (c+d x))}{d}-\frac {5 a^2 \cot (c+d x)}{d}-\frac {3 a^2 \cot ^3(c+d x)}{d}-\frac {7 a^2 \cot ^5(c+d x)}{5 d}-\frac {2 a^2 \cot ^7(c+d x)}{7 d}-\frac {2 a^2 \csc (c+d x)}{d}-\frac {2 a^2 \csc ^3(c+d x)}{3 d}-\frac {2 a^2 \csc ^5(c+d x)}{5 d}-\frac {2 a^2 \csc ^7(c+d x)}{7 d}+\frac {a^2 \tan (c+d x)}{d} \]

[Out]

2*a^2*arctanh(sin(d*x+c))/d-5*a^2*cot(d*x+c)/d-3*a^2*cot(d*x+c)^3/d-7/5*a^2*cot(d*x+c)^5/d-2/7*a^2*cot(d*x+c)^
7/d-2*a^2*csc(d*x+c)/d-2/3*a^2*csc(d*x+c)^3/d-2/5*a^2*csc(d*x+c)^5/d-2/7*a^2*csc(d*x+c)^7/d+a^2*tan(d*x+c)/d

Rubi [A] (verified)

Time = 0.32 (sec) , antiderivative size = 163, normalized size of antiderivative = 1.00, number of steps used = 12, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.381, Rules used = {3957, 2952, 3852, 2701, 308, 213, 2700, 276} \[ \int \csc ^8(c+d x) (a+a \sec (c+d x))^2 \, dx=\frac {2 a^2 \text {arctanh}(\sin (c+d x))}{d}+\frac {a^2 \tan (c+d x)}{d}-\frac {2 a^2 \cot ^7(c+d x)}{7 d}-\frac {7 a^2 \cot ^5(c+d x)}{5 d}-\frac {3 a^2 \cot ^3(c+d x)}{d}-\frac {5 a^2 \cot (c+d x)}{d}-\frac {2 a^2 \csc ^7(c+d x)}{7 d}-\frac {2 a^2 \csc ^5(c+d x)}{5 d}-\frac {2 a^2 \csc ^3(c+d x)}{3 d}-\frac {2 a^2 \csc (c+d x)}{d} \]

[In]

Int[Csc[c + d*x]^8*(a + a*Sec[c + d*x])^2,x]

[Out]

(2*a^2*ArcTanh[Sin[c + d*x]])/d - (5*a^2*Cot[c + d*x])/d - (3*a^2*Cot[c + d*x]^3)/d - (7*a^2*Cot[c + d*x]^5)/(
5*d) - (2*a^2*Cot[c + d*x]^7)/(7*d) - (2*a^2*Csc[c + d*x])/d - (2*a^2*Csc[c + d*x]^3)/(3*d) - (2*a^2*Csc[c + d
*x]^5)/(5*d) - (2*a^2*Csc[c + d*x]^7)/(7*d) + (a^2*Tan[c + d*x])/d

Rule 213

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[b, 2])^(-1))*ArcTanh[Rt[b, 2]*(x/Rt[-a, 2])]
, x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

Rule 276

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*(a + b*x^n)^p,
 x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0]

Rule 308

Int[(x_)^(m_)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Int[PolynomialDivide[x^m, a + b*x^n, x], x] /; FreeQ[{a,
b}, x] && IGtQ[m, 0] && IGtQ[n, 0] && GtQ[m, 2*n - 1]

Rule 2700

Int[csc[(e_.) + (f_.)*(x_)]^(m_.)*sec[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> Dist[1/f, Subst[Int[(1 + x^2)^((
m + n)/2 - 1)/x^m, x], x, Tan[e + f*x]], x] /; FreeQ[{e, f}, x] && IntegersQ[m, n, (m + n)/2]

Rule 2701

Int[(csc[(e_.) + (f_.)*(x_)]*(a_.))^(m_)*sec[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> Dist[-(f*a^n)^(-1), Subst
[Int[x^(m + n - 1)/(-1 + x^2/a^2)^((n + 1)/2), x], x, a*Csc[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && Integer
Q[(n + 1)/2] &&  !(IntegerQ[(m + 1)/2] && LtQ[0, m, n])

Rule 2952

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((a_) + (b_.)*sin[(e_.) + (f_.)*
(x_)])^(m_), x_Symbol] :> Int[ExpandTrig[(g*cos[e + f*x])^p, (d*sin[e + f*x])^n*(a + b*sin[e + f*x])^m, x], x]
 /; FreeQ[{a, b, d, e, f, g, n, p}, x] && EqQ[a^2 - b^2, 0] && IGtQ[m, 0]

Rule 3852

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Dist[-d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rule 3957

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.), x_Symbol] :> Int[(g*Co
s[e + f*x])^p*((b + a*Sin[e + f*x])^m/Sin[e + f*x]^m), x] /; FreeQ[{a, b, e, f, g, p}, x] && IntegerQ[m]

Rubi steps \begin{align*} \text {integral}& = \int (-a-a \cos (c+d x))^2 \csc ^8(c+d x) \sec ^2(c+d x) \, dx \\ & = \int \left (a^2 \csc ^8(c+d x)+2 a^2 \csc ^8(c+d x) \sec (c+d x)+a^2 \csc ^8(c+d x) \sec ^2(c+d x)\right ) \, dx \\ & = a^2 \int \csc ^8(c+d x) \, dx+a^2 \int \csc ^8(c+d x) \sec ^2(c+d x) \, dx+\left (2 a^2\right ) \int \csc ^8(c+d x) \sec (c+d x) \, dx \\ & = \frac {a^2 \text {Subst}\left (\int \frac {\left (1+x^2\right )^4}{x^8} \, dx,x,\tan (c+d x)\right )}{d}-\frac {a^2 \text {Subst}\left (\int \left (1+3 x^2+3 x^4+x^6\right ) \, dx,x,\cot (c+d x)\right )}{d}-\frac {\left (2 a^2\right ) \text {Subst}\left (\int \frac {x^8}{-1+x^2} \, dx,x,\csc (c+d x)\right )}{d} \\ & = -\frac {a^2 \cot (c+d x)}{d}-\frac {a^2 \cot ^3(c+d x)}{d}-\frac {3 a^2 \cot ^5(c+d x)}{5 d}-\frac {a^2 \cot ^7(c+d x)}{7 d}+\frac {a^2 \text {Subst}\left (\int \left (1+\frac {1}{x^8}+\frac {4}{x^6}+\frac {6}{x^4}+\frac {4}{x^2}\right ) \, dx,x,\tan (c+d x)\right )}{d}-\frac {\left (2 a^2\right ) \text {Subst}\left (\int \left (1+x^2+x^4+x^6+\frac {1}{-1+x^2}\right ) \, dx,x,\csc (c+d x)\right )}{d} \\ & = -\frac {5 a^2 \cot (c+d x)}{d}-\frac {3 a^2 \cot ^3(c+d x)}{d}-\frac {7 a^2 \cot ^5(c+d x)}{5 d}-\frac {2 a^2 \cot ^7(c+d x)}{7 d}-\frac {2 a^2 \csc (c+d x)}{d}-\frac {2 a^2 \csc ^3(c+d x)}{3 d}-\frac {2 a^2 \csc ^5(c+d x)}{5 d}-\frac {2 a^2 \csc ^7(c+d x)}{7 d}+\frac {a^2 \tan (c+d x)}{d}-\frac {\left (2 a^2\right ) \text {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,\csc (c+d x)\right )}{d} \\ & = \frac {2 a^2 \text {arctanh}(\sin (c+d x))}{d}-\frac {5 a^2 \cot (c+d x)}{d}-\frac {3 a^2 \cot ^3(c+d x)}{d}-\frac {7 a^2 \cot ^5(c+d x)}{5 d}-\frac {2 a^2 \cot ^7(c+d x)}{7 d}-\frac {2 a^2 \csc (c+d x)}{d}-\frac {2 a^2 \csc ^3(c+d x)}{3 d}-\frac {2 a^2 \csc ^5(c+d x)}{5 d}-\frac {2 a^2 \csc ^7(c+d x)}{7 d}+\frac {a^2 \tan (c+d x)}{d} \\ \end{align*}

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(428\) vs. \(2(163)=326\).

Time = 2.96 (sec) , antiderivative size = 428, normalized size of antiderivative = 2.63 \[ \int \csc ^8(c+d x) (a+a \sec (c+d x))^2 \, dx=\frac {a^2 \cos (c+d x) \sec ^4\left (\frac {1}{2} (c+d x)\right ) (1+\sec (c+d x))^2 \left (-6881280 \cos (c+d x) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )+6881280 \cos (c+d x) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )-32 \csc (2 c) \csc ^4\left (\frac {1}{2} (c+d x)\right ) \csc ^3(c+d x) (-9856 \sin (2 c)+17288 \sin (d x)-29056 \sin (2 d x)-7264 \sin (c-d x)+14208 \sin (c+d x)-19536 \sin (2 (c+d x))+7104 \sin (3 (c+d x))+7104 \sin (4 (c+d x))-7104 \sin (5 (c+d x))+1776 \sin (6 (c+d x))+17288 \sin (2 c+d x)+20384 \sin (3 c+d x)-23771 \sin (c+2 d x)+7104 \sin (2 (c+2 d x))-23771 \sin (3 c+2 d x)-8960 \sin (4 c+2 d x)+19984 \sin (c+3 d x)+8644 \sin (2 c+3 d x)+8644 \sin (4 c+3 d x)-6160 \sin (5 c+3 d x)+8644 \sin (3 c+4 d x)+8644 \sin (5 c+4 d x)+6720 \sin (6 c+4 d x)-12144 \sin (3 c+5 d x)-8644 \sin (4 c+5 d x)-8644 \sin (6 c+5 d x)-1680 \sin (7 c+5 d x)+3456 \sin (4 c+6 d x)+2161 \sin (5 c+6 d x)+2161 \sin (7 c+6 d x))\right )}{13762560 d} \]

[In]

Integrate[Csc[c + d*x]^8*(a + a*Sec[c + d*x])^2,x]

[Out]

(a^2*Cos[c + d*x]*Sec[(c + d*x)/2]^4*(1 + Sec[c + d*x])^2*(-6881280*Cos[c + d*x]*Log[Cos[(c + d*x)/2] - Sin[(c
 + d*x)/2]] + 6881280*Cos[c + d*x]*Log[Cos[(c + d*x)/2] + Sin[(c + d*x)/2]] - 32*Csc[2*c]*Csc[(c + d*x)/2]^4*C
sc[c + d*x]^3*(-9856*Sin[2*c] + 17288*Sin[d*x] - 29056*Sin[2*d*x] - 7264*Sin[c - d*x] + 14208*Sin[c + d*x] - 1
9536*Sin[2*(c + d*x)] + 7104*Sin[3*(c + d*x)] + 7104*Sin[4*(c + d*x)] - 7104*Sin[5*(c + d*x)] + 1776*Sin[6*(c
+ d*x)] + 17288*Sin[2*c + d*x] + 20384*Sin[3*c + d*x] - 23771*Sin[c + 2*d*x] + 7104*Sin[2*(c + 2*d*x)] - 23771
*Sin[3*c + 2*d*x] - 8960*Sin[4*c + 2*d*x] + 19984*Sin[c + 3*d*x] + 8644*Sin[2*c + 3*d*x] + 8644*Sin[4*c + 3*d*
x] - 6160*Sin[5*c + 3*d*x] + 8644*Sin[3*c + 4*d*x] + 8644*Sin[5*c + 4*d*x] + 6720*Sin[6*c + 4*d*x] - 12144*Sin
[3*c + 5*d*x] - 8644*Sin[4*c + 5*d*x] - 8644*Sin[6*c + 5*d*x] - 1680*Sin[7*c + 5*d*x] + 3456*Sin[4*c + 6*d*x]
+ 2161*Sin[5*c + 6*d*x] + 2161*Sin[7*c + 6*d*x])))/(13762560*d)

Maple [A] (verified)

Time = 1.33 (sec) , antiderivative size = 191, normalized size of antiderivative = 1.17

method result size
parallelrisch \(\frac {a^{2} \left (15 \cot \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}+35 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}+174 \cot \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}+910 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}-6720 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+6720 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+1141 \cot \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}-18375 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+6720 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )-6720 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+9380 \cot \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3360 d \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-3360 d}\) \(191\)
norman \(\frac {\frac {a^{2}}{224 d}+\frac {29 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{560 d}+\frac {163 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{480 d}+\frac {67 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}}{24 d}+\frac {13 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{10}}{48 d}+\frac {a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{12}}{96 d}-\frac {175 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}}{32 d}}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7} \left (-1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )}-\frac {2 a^{2} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d}+\frac {2 a^{2} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d}\) \(192\)
derivativedivides \(\frac {a^{2} \left (-\frac {1}{7 \sin \left (d x +c \right )^{7} \cos \left (d x +c \right )}-\frac {8}{35 \sin \left (d x +c \right )^{5} \cos \left (d x +c \right )}-\frac {16}{35 \sin \left (d x +c \right )^{3} \cos \left (d x +c \right )}+\frac {64}{35 \sin \left (d x +c \right ) \cos \left (d x +c \right )}-\frac {128 \cot \left (d x +c \right )}{35}\right )+2 a^{2} \left (-\frac {1}{7 \sin \left (d x +c \right )^{7}}-\frac {1}{5 \sin \left (d x +c \right )^{5}}-\frac {1}{3 \sin \left (d x +c \right )^{3}}-\frac {1}{\sin \left (d x +c \right )}+\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )\right )+a^{2} \left (-\frac {16}{35}-\frac {\csc \left (d x +c \right )^{6}}{7}-\frac {6 \csc \left (d x +c \right )^{4}}{35}-\frac {8 \csc \left (d x +c \right )^{2}}{35}\right ) \cot \left (d x +c \right )}{d}\) \(193\)
default \(\frac {a^{2} \left (-\frac {1}{7 \sin \left (d x +c \right )^{7} \cos \left (d x +c \right )}-\frac {8}{35 \sin \left (d x +c \right )^{5} \cos \left (d x +c \right )}-\frac {16}{35 \sin \left (d x +c \right )^{3} \cos \left (d x +c \right )}+\frac {64}{35 \sin \left (d x +c \right ) \cos \left (d x +c \right )}-\frac {128 \cot \left (d x +c \right )}{35}\right )+2 a^{2} \left (-\frac {1}{7 \sin \left (d x +c \right )^{7}}-\frac {1}{5 \sin \left (d x +c \right )^{5}}-\frac {1}{3 \sin \left (d x +c \right )^{3}}-\frac {1}{\sin \left (d x +c \right )}+\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )\right )+a^{2} \left (-\frac {16}{35}-\frac {\csc \left (d x +c \right )^{6}}{7}-\frac {6 \csc \left (d x +c \right )^{4}}{35}-\frac {8 \csc \left (d x +c \right )^{2}}{35}\right ) \cot \left (d x +c \right )}{d}\) \(193\)
risch \(-\frac {4 i a^{2} \left (105 \,{\mathrm e}^{11 i \left (d x +c \right )}-420 \,{\mathrm e}^{10 i \left (d x +c \right )}+385 \,{\mathrm e}^{9 i \left (d x +c \right )}+560 \,{\mathrm e}^{8 i \left (d x +c \right )}-1274 \,{\mathrm e}^{7 i \left (d x +c \right )}+616 \,{\mathrm e}^{6 i \left (d x +c \right )}+454 \,{\mathrm e}^{5 i \left (d x +c \right )}-1816 \,{\mathrm e}^{4 i \left (d x +c \right )}+1249 \,{\mathrm e}^{3 i \left (d x +c \right )}+444 \,{\mathrm e}^{2 i \left (d x +c \right )}-759 \,{\mathrm e}^{i \left (d x +c \right )}+216\right )}{105 d \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )^{7} \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )^{3} \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}+\frac {2 a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{d}-\frac {2 a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{d}\) \(215\)

[In]

int(csc(d*x+c)^8*(a+a*sec(d*x+c))^2,x,method=_RETURNVERBOSE)

[Out]

a^2*(15*cot(1/2*d*x+1/2*c)^7+35*tan(1/2*d*x+1/2*c)^5+174*cot(1/2*d*x+1/2*c)^5+910*tan(1/2*d*x+1/2*c)^3-6720*ln
(tan(1/2*d*x+1/2*c)-1)*tan(1/2*d*x+1/2*c)^2+6720*ln(tan(1/2*d*x+1/2*c)+1)*tan(1/2*d*x+1/2*c)^2+1141*cot(1/2*d*
x+1/2*c)^3-18375*tan(1/2*d*x+1/2*c)+6720*ln(tan(1/2*d*x+1/2*c)-1)-6720*ln(tan(1/2*d*x+1/2*c)+1)+9380*cot(1/2*d
*x+1/2*c))/(3360*d*tan(1/2*d*x+1/2*c)^2-3360*d)

Fricas [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 272, normalized size of antiderivative = 1.67 \[ \int \csc ^8(c+d x) (a+a \sec (c+d x))^2 \, dx=-\frac {432 \, a^{2} \cos \left (d x + c\right )^{6} - 654 \, a^{2} \cos \left (d x + c\right )^{5} - 636 \, a^{2} \cos \left (d x + c\right )^{4} + 1226 \, a^{2} \cos \left (d x + c\right )^{3} + 74 \, a^{2} \cos \left (d x + c\right )^{2} - 562 \, a^{2} \cos \left (d x + c\right ) - 105 \, {\left (a^{2} \cos \left (d x + c\right )^{5} - 2 \, a^{2} \cos \left (d x + c\right )^{4} + 2 \, a^{2} \cos \left (d x + c\right )^{2} - a^{2} \cos \left (d x + c\right )\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) \sin \left (d x + c\right ) + 105 \, {\left (a^{2} \cos \left (d x + c\right )^{5} - 2 \, a^{2} \cos \left (d x + c\right )^{4} + 2 \, a^{2} \cos \left (d x + c\right )^{2} - a^{2} \cos \left (d x + c\right )\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) \sin \left (d x + c\right ) + 105 \, a^{2}}{105 \, {\left (d \cos \left (d x + c\right )^{5} - 2 \, d \cos \left (d x + c\right )^{4} + 2 \, d \cos \left (d x + c\right )^{2} - d \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )} \]

[In]

integrate(csc(d*x+c)^8*(a+a*sec(d*x+c))^2,x, algorithm="fricas")

[Out]

-1/105*(432*a^2*cos(d*x + c)^6 - 654*a^2*cos(d*x + c)^5 - 636*a^2*cos(d*x + c)^4 + 1226*a^2*cos(d*x + c)^3 + 7
4*a^2*cos(d*x + c)^2 - 562*a^2*cos(d*x + c) - 105*(a^2*cos(d*x + c)^5 - 2*a^2*cos(d*x + c)^4 + 2*a^2*cos(d*x +
 c)^2 - a^2*cos(d*x + c))*log(sin(d*x + c) + 1)*sin(d*x + c) + 105*(a^2*cos(d*x + c)^5 - 2*a^2*cos(d*x + c)^4
+ 2*a^2*cos(d*x + c)^2 - a^2*cos(d*x + c))*log(-sin(d*x + c) + 1)*sin(d*x + c) + 105*a^2)/((d*cos(d*x + c)^5 -
 2*d*cos(d*x + c)^4 + 2*d*cos(d*x + c)^2 - d*cos(d*x + c))*sin(d*x + c))

Sympy [F(-1)]

Timed out. \[ \int \csc ^8(c+d x) (a+a \sec (c+d x))^2 \, dx=\text {Timed out} \]

[In]

integrate(csc(d*x+c)**8*(a+a*sec(d*x+c))**2,x)

[Out]

Timed out

Maxima [A] (verification not implemented)

none

Time = 0.21 (sec) , antiderivative size = 175, normalized size of antiderivative = 1.07 \[ \int \csc ^8(c+d x) (a+a \sec (c+d x))^2 \, dx=-\frac {a^{2} {\left (\frac {2 \, {\left (105 \, \sin \left (d x + c\right )^{6} + 35 \, \sin \left (d x + c\right )^{4} + 21 \, \sin \left (d x + c\right )^{2} + 15\right )}}{\sin \left (d x + c\right )^{7}} - 105 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 105 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 3 \, a^{2} {\left (\frac {140 \, \tan \left (d x + c\right )^{6} + 70 \, \tan \left (d x + c\right )^{4} + 28 \, \tan \left (d x + c\right )^{2} + 5}{\tan \left (d x + c\right )^{7}} - 35 \, \tan \left (d x + c\right )\right )} + \frac {3 \, {\left (35 \, \tan \left (d x + c\right )^{6} + 35 \, \tan \left (d x + c\right )^{4} + 21 \, \tan \left (d x + c\right )^{2} + 5\right )} a^{2}}{\tan \left (d x + c\right )^{7}}}{105 \, d} \]

[In]

integrate(csc(d*x+c)^8*(a+a*sec(d*x+c))^2,x, algorithm="maxima")

[Out]

-1/105*(a^2*(2*(105*sin(d*x + c)^6 + 35*sin(d*x + c)^4 + 21*sin(d*x + c)^2 + 15)/sin(d*x + c)^7 - 105*log(sin(
d*x + c) + 1) + 105*log(sin(d*x + c) - 1)) + 3*a^2*((140*tan(d*x + c)^6 + 70*tan(d*x + c)^4 + 28*tan(d*x + c)^
2 + 5)/tan(d*x + c)^7 - 35*tan(d*x + c)) + 3*(35*tan(d*x + c)^6 + 35*tan(d*x + c)^4 + 21*tan(d*x + c)^2 + 5)*a
^2/tan(d*x + c)^7)/d

Giac [A] (verification not implemented)

none

Time = 0.35 (sec) , antiderivative size = 168, normalized size of antiderivative = 1.03 \[ \int \csc ^8(c+d x) (a+a \sec (c+d x))^2 \, dx=\frac {35 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 6720 \, a^{2} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 6720 \, a^{2} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) + 945 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \frac {6720 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1} - \frac {10710 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} + 1330 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 189 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 15 \, a^{2}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7}}}{3360 \, d} \]

[In]

integrate(csc(d*x+c)^8*(a+a*sec(d*x+c))^2,x, algorithm="giac")

[Out]

1/3360*(35*a^2*tan(1/2*d*x + 1/2*c)^3 + 6720*a^2*log(abs(tan(1/2*d*x + 1/2*c) + 1)) - 6720*a^2*log(abs(tan(1/2
*d*x + 1/2*c) - 1)) + 945*a^2*tan(1/2*d*x + 1/2*c) - 6720*a^2*tan(1/2*d*x + 1/2*c)/(tan(1/2*d*x + 1/2*c)^2 - 1
) - (10710*a^2*tan(1/2*d*x + 1/2*c)^6 + 1330*a^2*tan(1/2*d*x + 1/2*c)^4 + 189*a^2*tan(1/2*d*x + 1/2*c)^2 + 15*
a^2)/tan(1/2*d*x + 1/2*c)^7)/d

Mupad [B] (verification not implemented)

Time = 13.47 (sec) , antiderivative size = 159, normalized size of antiderivative = 0.98 \[ \int \csc ^8(c+d x) (a+a \sec (c+d x))^2 \, dx=\frac {a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{96\,d}+\frac {4\,a^2\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d}+\frac {9\,a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{32\,d}-\frac {-166\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+\frac {268\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6}{3}+\frac {163\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{15}+\frac {58\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{35}+\frac {a^2}{7}}{d\,\left (32\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7-32\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9\right )} \]

[In]

int((a + a/cos(c + d*x))^2/sin(c + d*x)^8,x)

[Out]

(a^2*tan(c/2 + (d*x)/2)^3)/(96*d) + (4*a^2*atanh(tan(c/2 + (d*x)/2)))/d + (9*a^2*tan(c/2 + (d*x)/2))/(32*d) -
((58*a^2*tan(c/2 + (d*x)/2)^2)/35 + (163*a^2*tan(c/2 + (d*x)/2)^4)/15 + (268*a^2*tan(c/2 + (d*x)/2)^6)/3 - 166
*a^2*tan(c/2 + (d*x)/2)^8 + a^2/7)/(d*(32*tan(c/2 + (d*x)/2)^7 - 32*tan(c/2 + (d*x)/2)^9))